* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  background-color: #f5f6fa;
  color: #1f2d3d;
}

.page-header {
  padding: 2.5rem 1.5rem 1.5rem;
  background: linear-gradient(135deg, #2a6efd, #4fd1c5);
  color: #ffffff;
  text-align: center;
}

.page-header h1 {
  margin: 0 0 0.5rem;
  font-size: 2rem;
  font-weight: 600;
}

.page-header p {
  margin: 0;
  font-size: 1rem;
  opacity: 0.85;
}

main {
  max-width: 1100px;
  margin: -2rem auto 3rem;
  padding: 0 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.card {
  background-color: #ffffff;
  padding: 1.5rem;
  border-radius: 1rem;
  box-shadow: 0 12px 24px rgba(31, 45, 61, 0.06);
}

.card h2 {
  margin-top: 0;
  font-size: 1.35rem;
  font-weight: 600;
}

.card h3 {
  margin-top: 1rem;
  font-size: 1rem;
  font-weight: 600;
}

.grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  margin-top: 1rem;
}

.chart-container {
  margin: 1.5rem auto 0;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
}

.chart-container canvas {
  width: min(100%, 260px) !important;
  height: auto !important;
  max-width: 260px;
  display: block;
}

.metric {
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  padding: 1rem;
  background-color: #f8fafc;
}

.metric-label {
  display: block;
  font-size: 0.85rem;
  color: #556987;
}

.metric-value {
  display: block;
  font-size: 1.6rem;
  font-weight: 600;
  margin-top: 0.25rem;
}

.missing-values {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
}

th,
td {
  text-align: right;
  padding: 0.6rem 0.8rem;
  border-bottom: 1px solid #e2e8f0;
}

th:first-child,
td:first-child {
  text-align: left;
}

tbody tr:hover {
  background-color: #f1f5f9;
}

.image-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.image-grid img {
  width: 100%;
  border-radius: 0.75rem;
  border: 1px solid #e2e8f0;
}

figcaption {
  text-align: center;
  margin-top: 0.5rem;
  font-size: 0.9rem;
  color: #556987;
}

.page-footer {
  background-color: #0f172a;
  color: #cbd5f5;
  text-align: center;
  padding: 1.5rem 1rem 2rem;
  font-size: 0.9rem;
}

.page-footer code {
  color: #7dd3fc;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 2.25rem;
  transform: translateX(-50%) translateY(20px);
  background-color: rgba(229, 62, 62, 0.95);
  color: #ffffff;
  padding: 0.75rem 1.25rem;
  border-radius: 999px;
  box-shadow: 0 12px 24px rgba(229, 62, 62, 0.25);
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 9999;
}

.toast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@media (max-width: 600px) {
  .card {
    padding: 1.25rem;
  }

  .metric-value {
    font-size: 1.4rem;
  }

  .chart-container {
    margin-top: 1rem;
  }
}

@media (min-width: 768px) {
  .chart-container canvas {
    max-width: 320px;
  }
}
